package cn.bdqn.sys.vomapper;

import org.apache.ibatis.annotations.Insert;

/**
 * @author gurilla
 * @create 2019-08-10 9:06
 */
public interface RoleVoMapper {
    @Insert("INSERT INTO sys_role_resources (role_id,resources_id,eid) SELECT #{roleid}, id, #{eid} FROM sys_resources WHERE id IN (${resids});")
    void insertResRole(Integer roleid, String resids, Integer eid);
    @Insert("INSERT INTO sys_user_role (user_id, role_id, eid) SELECT #{userid},rid,#{eid} FROM sys_role WHERE rid IN (${roleids})")
    void insertUserRole(String roleids, Integer userid, Integer eid);
}

